---
title: "虚无的DDD（领域驱动设计）"
date: 2020-7-14
categories:
- architecture
tags:
---

<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgdf44ab8">Microsoft</a>
<ul>
<li><a href="#org0a36277">Application Layer</a></li>
<li><a href="#org34c2192">Domain model layer</a></li>
<li><a href="#org88aa7b8">Infrastructure layer</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="outline-2" id="outline-container-orgdf44ab8">
<h2 id="orgdf44ab8">Microsoft</h2>
<div class="outline-text-2" id="text-orgdf44ab8">
<blockquote>
<p>
<a href="https://docs.microsoft.com/zh-cn/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/ddd-oriented-microservice">https://docs.microsoft.com/zh-cn/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/ddd-oriented-microservice</a>
</p>
</blockquote>
</div>
<div class="outline-3" id="outline-container-org0a36277">
<h3 id="org0a36277">Application Layer</h3>
<div class="outline-text-3" id="text-org0a36277">
<ul class="org-ul">
<li>ASP.NET Web API</li>
<li>Network Access to microservice</li>
<li>API constraint/implementation</li>
<li>Commands and command handlers</li>
<li>Queries (when using an CQS approach)
<ul class="org-ul">
<li>Micro ORMs like Dapper</li>
</ul></li>
</ul>
</div>
</div>
<div class="outline-3" id="outline-container-org34c2192">
<h3 id="org34c2192">Domain model layer</h3>
<div class="outline-text-3" id="text-org34c2192">
<ul class="org-ul">
<li>Domain entity model</li>
<li>POCO entity class (clean C# code)</li>
<li>Domain entity with data + behavior</li>
<li>DDD patterns:
<ul class="org-ul">
<li>Domain entity, aggregate</li>
<li>Aggregate root, value object</li>
<li>Repository constraint/interfaces</li>
</ul></li>
</ul>
</div>
</div>
<div class="outline-3" id="outline-container-org88aa7b8">
<h3 id="org88aa7b8">Infrastructure layer</h3>
<div class="outline-text-3" id="text-org88aa7b8">
<ul class="org-ul">
<li>Data persistence infrastructure
<ul class="org-ul">
<li>Repository implementations</li>
</ul></li>
<li>Use of ORMs or data access API:
<ul class="org-ul">
<li>EntityFrameword Core or any ORM</li>
<li>ADO.net</li>
<li>Any NoSQL database API</li>
</ul></li>
<li>Other infrastructure implementation used from the application layer
<ul class="org-ul">
<li>Logging, cryptography, search engin, etc</li>
</ul></li>
</ul>
</div>
</div>
</div>
</div>
<div class="status" id="postamble">
<p class="date">Date: 2020-7-14</p>
<p class="author">Author: gdme1320</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
